Work Shop Preparation

Zachary M. Smith

February 19, 2019

Installation Links

Please install R and RStudio by following the links below.

Software Link
R https://cran.r-project.org/bin/windows/base/
RStudio https://www.rstudio.com/products/rstudio/download/#download

Updating Software and Packages

R

For Windows Operating Systems, run the following code in the RGui, NOT in RStudio. The RGui should be installed when you install R. On my Windows machine, I access RGui by clicking on the R program file– my current file name is “R x64 3.6.2”.

Once you have the RGui open, copy and paste the R code below into the R Console window. Make sure R Studio is closed before running this code within the RGui. Hit enter once to install the installr package. Hit enter a second time to run the installer package function updateR() and follow the instructions.

This code was copied from: https://www.r-statistics.com/2013/03/updating-r-from-r-on-windows-using-the-installr-package/).

# installing/loading the package:
if(!require(installr)) {
install.packages("installr");
require(installr)
} #load / install+load installr

# using the package:
updateR()

RStudio

  1. Open RStudio
  2. Click on “Help” on the toolbar
  3. Click on “Check for Updates”
  4. Follow instructions

R-Packages

  1. Open RStudio
  2. Click on “Tools” on the toolbar
  3. Click on “Check for Package Updates…”
  4. Follow instructions

Packages for Workshop

Please run the following code within RStudio to make sure you have all of necessary packages for this workshop installed.

  1. Open RStudio
  2. Copy the following code
package.vec <- c("tidyverse", "lubridate",
                 "knitr", "rmarkdown", "markdown", "bookdown", "caTools", "bitops",
                 "DT", "leaflet", "shiny", "jsonlite", "plotly",
                 "data.table", "rprojroot", "viridis")

install.packages(package.vec)
  1. Paste the code into the Console within RStudio
  2. Hit Enter
    • If prompted with “Do you want to restart R prior to installing?”, select “Yes”
    • If prompted again then select “No”
  3. The packages should begin to install. This may take some time.